using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for QUANLYTHETHEOKHACHHANG.
     /// </summary>
     public class QUANLYTHETHEOKHACHHANG
    {
              private Int32 _KHCARDMANAGERID;
      private Guid _MAKHACHHANG;
      private string _MATHE;
      private DateTime _NGAYCAPTHE;
      private DateTime _NGAYHETHANTHE;
      private DateTime _NGAYMUADAUTIEN;
      private DateTime _NGAYMUACUOICUNG;
      private decimal _TONGTICHLUY;
      private Int32 _STATUS;
      private bool _ISUSE;
      private bool _ISDELETE;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsKHCARDMANAGERIDNullable
      { get { return false;  } }
      public Int32 KHCARDMANAGERID
      {
         get { return _KHCARDMANAGERID; }
         set { _KHCARDMANAGERID = value; }
      }
      public bool IsMAKHACHHANGNullable
      { get { return true;  } }
      public Guid MAKHACHHANG
      {
         get { return _MAKHACHHANG;  }
         set { _MAKHACHHANG = value; }
      }
      public bool IsMATHENullable
      { get { return true;  } }
      public string MATHE
      {
         get { return _MATHE;  }
         set { _MATHE = value; }
      }
      public bool IsNGAYCAPTHENullable
      { get { return true;  } }
      public DateTime NGAYCAPTHE
      {
         get { return _NGAYCAPTHE;  }
         set { _NGAYCAPTHE = value; }
      }
      public bool IsNGAYHETHANTHENullable
      { get { return true;  } }
      public DateTime NGAYHETHANTHE
      {
         get { return _NGAYHETHANTHE;  }
         set { _NGAYHETHANTHE = value; }
      }
      public bool IsNGAYMUADAUTIENNullable
      { get { return true;  } }
      public DateTime NGAYMUADAUTIEN
      {
         get { return _NGAYMUADAUTIEN;  }
         set { _NGAYMUADAUTIEN = value; }
      }
      public bool IsNGAYMUACUOICUNGNullable
      { get { return true;  } }
      public DateTime NGAYMUACUOICUNG
      {
         get { return _NGAYMUACUOICUNG;  }
         set { _NGAYMUACUOICUNG = value; }
      }
      public bool IsTONGTICHLUYNullable
      { get { return true;  } }
      public decimal TONGTICHLUY
      {
         get { return _TONGTICHLUY;  }
         set { _TONGTICHLUY = value; }
      }
      public bool IsSTATUSNullable
      { get { return true;  } }
      public Int32 STATUS
      {
         get { return _STATUS;  }
         set { _STATUS = value; }
      }
      public bool IsISUSENullable
      { get { return true;  } }
      public bool ISUSE
      {
         get { return _ISUSE;  }
         set { _ISUSE = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }

        #endregion

        #region Constructors
        public QUANLYTHETHEOKHACHHANG()
        {
            Reset();
        }
        public QUANLYTHETHEOKHACHHANG(QUANLYTHETHEOKHACHHANG obj)
        {
            	this._KHCARDMANAGERID = obj.KHCARDMANAGERID;
	this._MAKHACHHANG = obj.MAKHACHHANG;
	this._MATHE = obj.MATHE;
	this._NGAYCAPTHE = obj.NGAYCAPTHE;
	this._NGAYHETHANTHE = obj.NGAYHETHANTHE;
	this._NGAYMUADAUTIEN = obj.NGAYMUADAUTIEN;
	this._NGAYMUACUOICUNG = obj.NGAYMUACUOICUNG;
	this._TONGTICHLUY = obj.TONGTICHLUY;
	this._STATUS = obj.STATUS;
	this._ISUSE = obj.ISUSE;
	this._ISDELETE = obj.ISDELETE;
        }
        #endregion

        public void Reset()
        {
                     _KHCARDMANAGERID = EmptyValues.v_Int32;
         _MAKHACHHANG = EmptyValues.v_Guid;
         _MATHE = EmptyValues.v_string;
         _NGAYCAPTHE = EmptyValues.v_DateTime;
         _NGAYHETHANTHE = EmptyValues.v_DateTime;
         _NGAYMUADAUTIEN = EmptyValues.v_DateTime;
         _NGAYMUACUOICUNG = EmptyValues.v_DateTime;
         _TONGTICHLUY = EmptyValues.v_decimal;
         _STATUS = EmptyValues.v_Int32;
         _ISUSE = EmptyValues.v_bool;
         _ISDELETE = EmptyValues.v_bool;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["KHCARDMANAGERID"] is DBNull))
		{
			obj.KHCARDMANAGERID = (Int32)reader["KHCARDMANAGERID"];
		}
                if(!(reader["MAKHACHHANG"] is DBNull))
		{
			obj.MAKHACHHANG = (Guid)reader["MAKHACHHANG"];
		}
                if(!(reader["MATHE"] is DBNull))
		{
			obj.MATHE = (string)reader["MATHE"];
		}
                if(!(reader["NGAYCAPTHE"] is DBNull))
		{
			obj.NGAYCAPTHE = (DateTime)reader["NGAYCAPTHE"];
		}
                if(!(reader["NGAYHETHANTHE"] is DBNull))
		{
			obj.NGAYHETHANTHE = (DateTime)reader["NGAYHETHANTHE"];
		}
                if(!(reader["NGAYMUADAUTIEN"] is DBNull))
		{
			obj.NGAYMUADAUTIEN = (DateTime)reader["NGAYMUADAUTIEN"];
		}
                if(!(reader["NGAYMUACUOICUNG"] is DBNull))
		{
			obj.NGAYMUACUOICUNG = (DateTime)reader["NGAYMUACUOICUNG"];
		}
                if(!(reader["TONGTICHLUY"] is DBNull))
		{
			obj.TONGTICHLUY = (decimal)reader["TONGTICHLUY"];
		}
                if(!(reader["STATUS"] is DBNull))
		{
			obj.STATUS = (Int32)reader["STATUS"];
		}
                if(!(reader["ISUSE"] is DBNull))
		{
			obj.ISUSE = (bool)reader["ISUSE"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
//            _KHCARDMANAGERID = (reader["KHCARDMANAGERID"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["KHCARDMANAGERID"];
//            _MAKHACHHANG = (reader["MAKHACHHANG"] is DBNull)?DalTools.EmptyValues.v_Guid:(Guid)reader["MAKHACHHANG"];
//            _MATHE = (reader["MATHE"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MATHE"];
//            _NGAYCAPTHE = (reader["NGAYCAPTHE"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYCAPTHE"];
//            _NGAYHETHANTHE = (reader["NGAYHETHANTHE"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYHETHANTHE"];
//            _NGAYMUADAUTIEN = (reader["NGAYMUADAUTIEN"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYMUADAUTIEN"];
//            _NGAYMUACUOICUNG = (reader["NGAYMUACUOICUNG"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYMUACUOICUNG"];
//            _TONGTICHLUY = (reader["TONGTICHLUY"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["TONGTICHLUY"];
//            _STATUS = (reader["STATUS"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["STATUS"];
//            _ISUSE = (reader["ISUSE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISUSE"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 KHCARDMANAGERID, Guid MAKHACHHANG, string MATHE, DateTime NGAYCAPTHE, DateTime NGAYHETHANTHE, DateTime NGAYMUADAUTIEN, DateTime NGAYMUACUOICUNG, decimal TONGTICHLUY, Int32 STATUS, bool ISUSE, bool ISDELETE)
        {
                     this._KHCARDMANAGERID = KHCARDMANAGERID;
         this._MAKHACHHANG = MAKHACHHANG;
         this._MATHE = MATHE;
         this._NGAYCAPTHE = NGAYCAPTHE;
         this._NGAYHETHANTHE = NGAYHETHANTHE;
         this._NGAYMUADAUTIEN = NGAYMUADAUTIEN;
         this._NGAYMUACUOICUNG = NGAYMUACUOICUNG;
         this._TONGTICHLUY = TONGTICHLUY;
         this._STATUS = STATUS;
         this._ISUSE = ISUSE;
         this._ISDELETE = ISDELETE;
        }
    }
}